/**
 * 报表模块接口列表
 */

import axios from '@/request/http'; // 导入http中创建的axios实例
import qs from 'qs'; // 根据需求是否导入qs模块

const student = {
    GetSearch(searchType,rtp,ptime,projectId,schoolId,gradeId) {
        return axios.post(`/server/report/load/search`, {
            searchType: searchType,
            reportType:rtp,
            paymentTimeId:ptime,
            projectId: projectId,
            schoolId:schoolId,
            gradeId:gradeId
        });
    },
    // 获取应收列表
    GetReceivableList(qt,qtm,pin) {
        return axios.post(`/server/report/payable/load/list`, {queryType:qt,queryTerm:JSON.stringify(qtm),page:pin});
    },
    // 获取实收列表
    GetNetReceiptsList(qt,qtm,pin) {
      return axios.post(`/server/report/paid/load/list`, {queryType:qt,queryTerm:JSON.stringify(qtm),page:pin});
    },
    // 获取欠缴报表
    GetArrearList(qt,qtm,pin) {
      return axios.post(`/server/report/owe/fee/load/list`, {queryType:qt,queryTerm:JSON.stringify(qtm),page:pin});
    },
    // 获取退费报表
    GetRefundList(qt,qtm,pin) {
      return axios.post(`/server/report/refund/load/list`, {queryType:qt,queryTerm:JSON.stringify(qtm),page:pin});
    },
    // 查询缴费方案的缴费项金额
    WatchPaymentAmount(pid, sid, seid, gid, stuid, pca,isr, imt, ipe){
      return axios.post('/server/report/load/project/item',{projectId:pid, schoolId:sid, sectionId:seid, gradeId:gid, studentId:stuid, paymentCategory:pca,isResidence:isr,isMilitaryTraining:imt, isPhysicalExamination:ipe})
    },
    // 查询缴费方案的缴费项金额
    WatchStudentAmount(pid, sid, seid, t, ir, imt, ipe){
      return axios.post('/server/report/load/student/item',{projectId:pid, studentId:sid, serialId:seid,type:t,isResidence:ir,isMilitaryTraining:imt, isPhysicalExamination:ipe})
    },
    // 实收打印
    PrintingFrom(pid,sid,seid,tp){
      var url = "";
      if(tp=='HongChong'){
        url = "/server/hongchong/print/detail";
      }else{
        url = "/server/report/paid/print/detail";
      }
      return axios.post(url,{projectId:pid,studentId:sid,serialId:seid})
    },
    // 获取减免报表列表
    GetReductionList(qt,qtm,pin) {
      return axios.post(`/server/report/tuition/load/list`, {queryType:qt,queryTerm:JSON.stringify(qtm),page:pin});
    },
    Getexport(qt,qtm,pin) {
      return axios.post(`/server/report/tuition/load/list`, {queryType:qt,queryTerm:JSON.stringify(qtm),page:pin});
    },
    GetReductionFiles(pid,sid){
      return axios.post('/server/report/tuition/load/files',{projectId:pid,studentId:sid})
    },

    // 获取实收修改详情
    GetDetail(sid){
      return axios.post('/server/report/paid/load/detail',{serialId:sid})
    },
    // 保存修改
    SaveNetReceiptsChnage(sid,t,r,p1,p2,p3,p4){
      return axios.post('/server/report/paid/save/detail',{serialId:sid,time:t,remark:r,cardMoney:p1,cashMoney:p2,transferMoney:p3,otherMoney:p4})
    },
    // 红冲打印
    PrintingHongChong(pid,sid,seid){
      return axios.post('/server/hongchong/print/detail',{projectId:pid,studentId:sid,serialId:seid})
    },
    // 设置减免
    SetRelief(pid,sid,ist){
      return axios.post('/server/report/payable/seting/tuition',{projectId:pid,studentId:sid,isTuition:ist})
    },
    // 个人中标表(学籍系统)
    GetPersonalForm(ftype,sid,stName,idc){
      if(ftype==='1'){
        return axios.post(`/server/statistics/student/load/xj`,{schoolId:sid,studentName:stName,idCard:idc});     //学籍系统
      }
      return axios.post(`/server/statistics/student/load/bm`,{schoolId:sid,studentName:stName,idCard:idc});       //报名系统
    },
    // 个人中标表(报名系统)
    // GetBaomingForm(sid,stName,idc){
    // }

}

export default student;
